package com.cysion.study.adapter

import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.cysion.study.ktbox.base.BaseAdapter
import com.cysion.study.ktbox.base.BaseViewHolder
import com.cysion.study.R

class FriendAdapter(mEntities: MutableList<String>, mContext: Context) :
    BaseAdapter<String>(mEntities, mContext) {
    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): BaseViewHolder<String> {
        return ProMoneyHolder(
            LayoutInflater.from(mContext).inflate(R.layout.item_friend, parent, false)
        )

    }

    class ProMoneyHolder(itemView: View) : BaseViewHolder<String>(itemView) {
        override fun fillData(obj: String, position: Int) {
            itemView?.apply {
                /*if (TextUtils.isEmpty(obj.headImageUrl)) {
                    iv_head.setImageResource(R.mipmap.default_head)
                } else {
                    Glide.with(context).load(obj.headImageUrl)
                        .apply(RequestOptions.placeholderOf(R.mipmap.place_holder_big))
                        .apply(RequestOptions.bitmapTransform(RoundTransform(6))).into(iv_head)
                }
                tv_name.text=obj.stName*/
            }
        }
    }
}